<?php

namespace app\admin\model\resume;

use think\Model;


class Education extends Model
{





    // 表名
    protected $name = 'resume_education';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'datetime';
    protected $dateFormat = 'Y-m-d H:i:s';

    // 定义时间戳字段名
    protected $createTime = 'CreatedTime';
    protected $updateTime = 'UpdatedTime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
        'EducationLevel_text'
    ];



    public function getEducationlevelList()
    {
        return ['10' => __('Educationlevel 10'), '20' => __('Educationlevel 20'), '30' => __('Educationlevel 30'), '40' => __('Educationlevel 40'), '50' => __('Educationlevel 50'), '60' => __('Educationlevel 60'), '70' => __('Educationlevel 70'), '80' => __('Educationlevel 80')];
    }


    public function getEducationlevelTextAttr($value, $data)
    {
        $value = $value ? $value : (isset($data['EducationLevel']) ? $data['EducationLevel'] : '');
        $list = $this->getEducationlevelList();
        return isset($list[$value]) ? $list[$value] : '';
    }




}
